//
//  DownLoadManager.h
//  DownLoad_demo
//
//  Created by muji on 16/3/18.
//  Copyright © 2016年 muji. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

@protocol DownLoadDelegate <NSObject>

- (void)getDownLoadLegth:(CGFloat)bytes;
- (void)downloadFinish:(NSString *)path;

@end

@interface DownLoadManager : NSObject

+ (instancetype)shared;

- (void)selectDownLoadBtn:(id<DownLoadDelegate>)delegate
                     with:(NSString *)filePath
                     with:(NSString *)url;
- (void)pause;

@property (nonatomic,strong) NSString *url;
@property (nonatomic,weak) id<DownLoadDelegate> delegate;
@property (nonatomic, strong) NSURLSessionDownloadTask *task;
@property (nonatomic, strong) NSData *resumeData;
@property (nonatomic, strong) NSURLSession *session;

@end
